<template>
  <div class="bookmark">
    <div class="title">
      <div class="text">Моя запрос</div>
    </div>
    <el-tabs v-model="queryParams.status" class="demo-tabs" @tab-click="tabClickFUn">
      <el-tab-pane label="Все" name=""></el-tab-pane>
      <el-tab-pane label="Решено" name="1"></el-tab-pane>
      <el-tab-pane label="Нерешенные вопросы" name="2"></el-tab-pane>
    </el-tabs>
    <div class="inquiryList">
      <div class="inquiryItem" v-for="item in list" :key="item.id" :style="{'margin-right': index % 2 == 0 ? '0' : '30px'}">
        <div class="top">
          <div class="idText">Номер：{{ item.id }}</div>
          <div class="time">{{ item.created_at }}</div>
        </div>
        <div class="listText">
          <div class="itemText">
            <div class="itemLeft">Название продукта：</div>
            <div class="itemRight">{{ item.goods_name }}</div>
          </div>
          <div class="itemText">
            <div class="itemLeft">Классификация：</div>
            <div class="itemRight">{{ item.goods_name }}</div>
          </div>
          <div class="itemText">
            <div class="itemLeft">Подробное описание：</div>
            <div class="itemRight">{{ item.describe }}</div>
          </div>
        </div>
        <div class="imgList">
          <img class="goodsImg" src="/src/assets/image/goodscs.png" alt="" v-for="index of 4">
        </div>
        <div class="btnBox">
          <div class="btn">Связаться с клиентом</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script setup lang="ts">
import {ref} from "vue"
import {getGoodspriceaskingList} from "@/api/api"
const queryParams=ref<any>({
  status:'',
  page:1,
  limit:100
})
const list = ref<any>([])
function getlist(){
  getGoodspriceaskingList(queryParams.value).then((res:any)=>{
    list.value = res.returnData.list
  })
}
getlist()
function tabClickFUn(e){
  console.log(e)
}
</script>
<style scoped lang="less">
:deep(.el-tabs__item){
  font-family: Segoe UI, Segoe UI;
  font-weight: 600;
  font-size: 16px;
  color: #999999;
  line-height: 16px;
  text-align: left;
  font-style: normal;
  text-transform: none;
}
:deep(.is-active){
  color: #0070E9;
}
:deep(.el-tabs__nav-wrap:after){
  display: none;
}
.bookmark {
  width: 1164px;
  background: #FFFFFF;
  border-radius: 16px 16px 16px 16px;
  padding: 20px;
  box-sizing: border-box;

  .title {
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid #EEEEEE;

    .text {
      font-family: Segoe UI, Segoe UI;
      font-weight: bold;
      font-size: 24px;
      color: #333333;
      line-height: 24px;
      text-align: left;
      font-style: normal;
      text-transform: none;
    }
  }

  .inquiryList{
    display: flex;
    flex-wrap: wrap;
    .inquiryItem{
      width: 547px;
      height: 410px;
      background: #FFFFFF;
      box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.15);
      border-radius: 12px 12px 12px 12px;
      box-sizing: border-box;
      padding: 12px;
      margin-top: 16px;
      .top{
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 12px;
        border-bottom: 1px solid #EEEEEE;
        .idText{
          font-family: PingFang SC, PingFang SC;
          font-weight: 500;
          font-size: 12px;
          color: #333333;
          line-height: 12px;
          text-align: left;
          font-style: normal;
          text-transform: none;
        }
        .time{
          font-family: PingFang SC, PingFang SC;
          font-weight: 500;
          font-size: 12px;
          color: #0070E9;
          line-height: 12px;
          text-align: right;
          font-style: normal;
          text-transform: none;
        }
      }

      .listText{
        .itemText{
          display: flex;
          align-items: center;
          justify-content: space-between;
          margin: 16px 0;
          .itemLeft{
            font-family: PingFang SC, PingFang SC;
            font-weight: 500;
            font-size: 12px;
            color: #999999;
            line-height: 12px;
            text-align: left;
            font-style: normal;
            text-transform: none;
          }
          .itemRight{
            font-family: PingFang SC, PingFang SC;
            font-weight: 500;
            font-size: 12px;
            color: #333333;
            line-height: 12px;
            text-align: left;
            font-style: normal;
            text-transform: none;
          }
        }
      }

      .imgList{
        width: 100%;
        display: flex;
        padding-bottom: 25px;
        border-bottom: 1px solid #EEEEEE;
        .goodsImg{
          width: 100px;
          height: 100px;
          background: #F6F6F6;
          border-radius: 4px 4px 4px 4px;
          margin-right: 9px;
        }
      }
      .btnBox{
        margin-top: 20px;
        display: flex;
        justify-content: right;
        .btn{
          cursor: pointer;
          width: 181px;
          height: 48px;
          border-radius: 12px 12px 12px 12px;
          border: 1px solid #CCCCCC;
          font-family: PingFang SC, PingFang SC;
          font-weight: 500;
          font-size: 13px;
          color: #333333;
          line-height: 48px;
          text-align: center;
          font-style: normal;
          text-transform: none;
        }
      }
    }
  }
}
</style>
